import request from "@/utils/request";
export default {
  logout() {
    return request({
      url: "/quit",
      method: "get",
    });
  },
  getOrganizerBasicProfile() {
    return request({
      url: "/organizers/mobile/basic",
      method: "get",
    });
  },
  getOrganizerProfile() {
    return request({
      url: "/organizers/mobile/detail",
      method: "get",
    });
  },
  updateOrganizerProfile(data) {
    return request({
      url: "/organizers/mobile/detail",
      method: "post",
      data,
    });
  },
  getAllOrganizerProfile() {
    return request({
      url: "/organizers/mobile/all",
      method: "get",
    });
  },
  getOneOrganizerProfile(id) {
    return request({
      url: `/organizers/mobile/one/${id}`,
      method: "get",
    });
  },
  getEventRegisterUser(id) {
    return request({
      url: `/registrations/user/${id}`,
      method: "get",
    });
  },
  getUserProfile(id) {
    return request({
      url: `/users/${id}`,
      method: "get",
    });
  },
  getEventUncheckedRegistration(eventId) {
    return request({
      url: `registrations/unchecked/${eventId}`,
      method: "get",
    });
  },
  registrationBatchApprove(ids) {
    return request({
      url: "/registrations/approve", // 后端接口地址
      method: "POST",
      data: ids, // 发送选中的用户 ID 列表
    });
  },
  registrationBatchReject(ids) {
    return request({
      url: "/registrations/reject", // 后端接口地址
      method: "POST",
      data: ids, // 发送选中的用户 ID 列表
    });
  },
  getUsersWithIncompleteParticipation(eventId){
    return request({
      url:`participation/incomplete/${eventId}`,
      method:"get",
    })
  },
  addParticipation(participationList) {
    return request({
      url: "/participation/batch",
      method: "post",
      data: participationList,
    });
  },
  addUnParticipation(participationList) {
    return request({
      url: "/participation/batch/un",
      method: "post",
      data: participationList,
    });
  },
};
